from imageCanvas import fitIntoBoundaries
import unittest

class testImageCanvas(unittest.TestCase):
    def testFitIntoBoundaries(self):
        self.assertEqual(2, fitIntoBoundaries(2, 1, 3))
        self.assertEqual(1, fitIntoBoundaries(1, 1, 3))
        self.assertEqual(3, fitIntoBoundaries(3, 1, 3))
        self.assertEqual(1, fitIntoBoundaries(0, 1, 3))
        self.assertEqual(3, fitIntoBoundaries(5, 1, 3))
